import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class XyLocalBoNav extends StatelessWidget {
  String topName;
  String bottomName;

  XyLocalBoNav({@required this.topName, @required this.bottomName});


  @override
  Widget build(BuildContext context) {
    ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: false);
    return Expanded(child: Container(
      height: ScreenUtil().setHeight(160),
      decoration: BoxDecoration(
        borderRadius: BorderRadius.all(Radius.circular(ScreenUtil().setSp(24))),
        gradient: LinearGradient(
            begin: Alignment.topLeft,
            end: Alignment.bottomRight,
            colors: [Color(0xFF4990F8), Color(0xFF5FC5F4)]
        ),
      ),
      child: Container(
        margin: EdgeInsets.only(left: ScreenUtil().setWidth(34)),
        child: Row(
        mainAxisAlignment: MainAxisAlignment.start,
        children: <Widget>[
          Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
            Center(child: Text(topName, style: TextStyle(color: Colors.white, fontSize: ScreenUtil().setSp(34)),),),
            Center(child: Text(bottomName, style: TextStyle(color: Colors.white, fontSize: ScreenUtil().setSp(24)),),)
          ]),
        ],
      ),)
    ));
  }
}
